USE [DeltaFlex]
GO

IF (OBJECT_ID('dbo.ARTICLES')) IS NOT NULL
	DROP TABLE dbo.ARTICLES
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE dbo.ARTICLES(
	IDARTICLE int NOT NULL,
	REFERENCIAARTICLE nvarchar(50) NOT NULL,
	NOMARTICLE nvarchar(50) NOT NULL,
	UNITAT nvarchar(10) NOT NULL,
	PVP decimal(8,4) NOT NULL

 CONSTRAINT PK_ARTICLES PRIMARY KEY CLUSTERED 
(
	IDARTICLE ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

IF (OBJECT_ID('SEQ_ARTICLES')IS NOT NULL)
	DROP SEQUENCE SEQ_ARTICLES
GO

CREATE SEQUENCE SEQ_ARTICLES
	START WITH 100
    INCREMENT BY 1
    MINVALUE 1
    MAXVALUE 9223372036854775807;

GO

